package entity;

import map.Map;

import org.newdawn.slick.GameContainer;
import org.newdawn.slick.Graphics;
import org.newdawn.slick.Input;
import org.newdawn.slick.SlickException;
import org.newdawn.slick.Sound;
import org.newdawn.slick.geom.Vector2f;

import animation.MacAnimation;
import constans.ResourceManager;
import frame.Frame;

public class Cannon extends ShootingEntity{

	Sound shootSnd;
	
	public Cannon(Vector2f position)
	{
		super(position);
		size = 50.f;
	
	}
	public void render(GameContainer container, Graphics g) throws SlickException
	{	
		position.sub(Map.shift);
		animation.draw(position.x - size/2, position.y - size/2);
		position.add(Map.shift);
	}
	public void update(GameContainer container, int delta) throws SlickException
	{
		if(animate)
		{
			animation.update();
			animate = !animation.isEnd();
		}
	}

	
}
